package com.value.web;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.value.annotation.Controller;
import com.value.annotation.RequestMapping;
import com.value.model.FormBean;
import com.value.model.User;
@Controller("test")
public class UserAction implements ActionForm{
	@RequestMapping("/user/add")
	public String execute(HttpServletRequest request,HttpServletResponse response,FormBean bean) {
		User u = (User)bean;
		
		String  url = "success";
		String username = request.getParameter("username");
		String email = request.getParameter("email");
		String phone = request.getParameter("phone");
		String nickName = request.getParameter("nickName");
		u.setEmail(email);
		u.setNickName(nickName);
		u.setPhone(phone);
		u.setUsername(username);
		request.setAttribute("user",u);
		
		return "user/success";
	}


}
